feat: add strictly_order_preserving for more expr - #23922
Open
rluvaton wants to merge 2 commits into
Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #23922 +/- ##
==========================================
+ Coverage 80.67% 80.69% +0.02%
==========================================
Files 1095 1095
Lines 372376 372641 +265
Branches 372376 372641 +265
==========================================
+ Hits 300397 300695 +298
+ Misses 54052 53992 -60
- Partials 17927 17954 +27 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
neilconway
reviewed
Jul 28, 2026
Comment on lines
+126
to
+128
| // There is one-to-one mapping between input and output and nulls maps to nulls | ||
| // and because overflow will be resulted in an error and not wrapping or saturating we are ok | ||
| Ok(true) |
Contributor
There was a problem hiding this comment.
I don't think this is right: factorial(0) == factorial(1) == 1.
| } | ||
|
|
||
| fn strictly_order_preserving(&self, _inputs: &[ExprProperties]) -> Result<bool> { | ||
| // floor allow distinct inputs to collapse into equal outputs |
Comment on lines
+166
to
+167
| // repeat does not strictly preserve ordering since for the following 2 rows: | ||
| // "bc" and "bca" and repeat(2) the result will be "bcbc" and "bcabca" which now the order is different |
Contributor
There was a problem hiding this comment.
Suggested change
| // repeat does not strictly preserve ordering since for the following 2 rows: | |
| // "bc" and "bca" and repeat(2) the result will be "bcbc" and "bcabca" which now the order is different | |
| // repeat('bc', 2) = 'bcbc' > repeat('bca', 2) = 'bcabca', so ordering is not preserved |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
strictly_order_preservingand mark them as such #23920Rationale for this change
just more uses of the new property
What changes are included in this PR?
marked if something is order preserving or not
Are these changes tested?
no
Are there any user-facing changes?
not api ones